package com.yazi.mxz.behavior.repository;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.core.query.TextCriteria;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.yazi.mxz.behavior.entity.repository.StoreGoods;

public interface StoreGoodsRepository extends MongoRepository<StoreGoods, Long> {
	Page<StoreGoods> findAllBy(TextCriteria criteria, Pageable pb);
	Page<StoreGoods> findByStore_StoreId(long storeId, Pageable pb);
	Page<StoreGoods> findByStore_StoreId(long storeId, TextCriteria criteria, Pageable pb);
	Page<StoreGoods> findByStore_StoreIdAndClassifyId0(long storeId, long classifyId0, Pageable pb);
	Page<StoreGoods> findByStore_StoreIdAndClassifyId1(long storeId, long classifyId1, Pageable pb);
	Page<StoreGoods> findByCatId0(long catId, Pageable pb);
	Page<StoreGoods> findByCatId1(long catId, Pageable pb);
	Page<StoreGoods> findByCatId2(long catId, Pageable pb);
}
